﻿Imports System.Collections.ObjectModel
Imports System.ComponentModel

Public Class OpenedWindowList
    Inherits ObservableCollection(Of OpenedWindowClass)

    Private Shared list As New OpenedWindowList

    Public Shared Function GetList() As OpenedWindowList
        Return list
    End Function

    Private Sub New()
        ' Make the constructor private, enforcing the 
        ' "factory" concept -- the only way to create
        ' an instance of this class is by calling
        ' the GetList method.
        AddItems()
    End Sub

    Public Shared Sub Reset()
        list.ClearItems()
        list.AddItems()
    End Sub

    Private Sub AddItems()
        'Add(New OpenedWindowClass("Maria Anders"))
        'Add(New OpenedWindowClass("Ana Trujillo"))
        'Add(New OpenedWindowClass("Antonio Moreno"))
    End Sub
End Class
